package pe.com.empresa.datos.dominio;

import java.util.ArrayList;
import java.util.List;

public class UbigeoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public UbigeoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdUbigeoIsNull() {
            addCriterion("idUbigeo is null");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoIsNotNull() {
            addCriterion("idUbigeo is not null");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoEqualTo(Integer value) {
            addCriterion("idUbigeo =", value, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoNotEqualTo(Integer value) {
            addCriterion("idUbigeo <>", value, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoGreaterThan(Integer value) {
            addCriterion("idUbigeo >", value, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoGreaterThanOrEqualTo(Integer value) {
            addCriterion("idUbigeo >=", value, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoLessThan(Integer value) {
            addCriterion("idUbigeo <", value, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoLessThanOrEqualTo(Integer value) {
            addCriterion("idUbigeo <=", value, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoIn(List<Integer> values) {
            addCriterion("idUbigeo in", values, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoNotIn(List<Integer> values) {
            addCriterion("idUbigeo not in", values, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoBetween(Integer value1, Integer value2) {
            addCriterion("idUbigeo between", value1, value2, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andIdUbigeoNotBetween(Integer value1, Integer value2) {
            addCriterion("idUbigeo not between", value1, value2, "idUbigeo");
            return (Criteria) this;
        }

        public Criteria andDepartementoIsNull() {
            addCriterion("departemento is null");
            return (Criteria) this;
        }

        public Criteria andDepartementoIsNotNull() {
            addCriterion("departemento is not null");
            return (Criteria) this;
        }

        public Criteria andDepartementoEqualTo(String value) {
            addCriterion("departemento =", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoNotEqualTo(String value) {
            addCriterion("departemento <>", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoGreaterThan(String value) {
            addCriterion("departemento >", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoGreaterThanOrEqualTo(String value) {
            addCriterion("departemento >=", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoLessThan(String value) {
            addCriterion("departemento <", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoLessThanOrEqualTo(String value) {
            addCriterion("departemento <=", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoLike(String value) {
            addCriterion("departemento like", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoNotLike(String value) {
            addCriterion("departemento not like", value, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoIn(List<String> values) {
            addCriterion("departemento in", values, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoNotIn(List<String> values) {
            addCriterion("departemento not in", values, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoBetween(String value1, String value2) {
            addCriterion("departemento between", value1, value2, "departemento");
            return (Criteria) this;
        }

        public Criteria andDepartementoNotBetween(String value1, String value2) {
            addCriterion("departemento not between", value1, value2, "departemento");
            return (Criteria) this;
        }

        public Criteria andProvinciaIsNull() {
            addCriterion("provincia is null");
            return (Criteria) this;
        }

        public Criteria andProvinciaIsNotNull() {
            addCriterion("provincia is not null");
            return (Criteria) this;
        }

        public Criteria andProvinciaEqualTo(String value) {
            addCriterion("provincia =", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaNotEqualTo(String value) {
            addCriterion("provincia <>", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaGreaterThan(String value) {
            addCriterion("provincia >", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaGreaterThanOrEqualTo(String value) {
            addCriterion("provincia >=", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaLessThan(String value) {
            addCriterion("provincia <", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaLessThanOrEqualTo(String value) {
            addCriterion("provincia <=", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaLike(String value) {
            addCriterion("provincia like", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaNotLike(String value) {
            addCriterion("provincia not like", value, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaIn(List<String> values) {
            addCriterion("provincia in", values, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaNotIn(List<String> values) {
            addCriterion("provincia not in", values, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaBetween(String value1, String value2) {
            addCriterion("provincia between", value1, value2, "provincia");
            return (Criteria) this;
        }

        public Criteria andProvinciaNotBetween(String value1, String value2) {
            addCriterion("provincia not between", value1, value2, "provincia");
            return (Criteria) this;
        }

        public Criteria andDistritoIsNull() {
            addCriterion("distrito is null");
            return (Criteria) this;
        }

        public Criteria andDistritoIsNotNull() {
            addCriterion("distrito is not null");
            return (Criteria) this;
        }

        public Criteria andDistritoEqualTo(String value) {
            addCriterion("distrito =", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoNotEqualTo(String value) {
            addCriterion("distrito <>", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoGreaterThan(String value) {
            addCriterion("distrito >", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoGreaterThanOrEqualTo(String value) {
            addCriterion("distrito >=", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoLessThan(String value) {
            addCriterion("distrito <", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoLessThanOrEqualTo(String value) {
            addCriterion("distrito <=", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoLike(String value) {
            addCriterion("distrito like", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoNotLike(String value) {
            addCriterion("distrito not like", value, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoIn(List<String> values) {
            addCriterion("distrito in", values, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoNotIn(List<String> values) {
            addCriterion("distrito not in", values, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoBetween(String value1, String value2) {
            addCriterion("distrito between", value1, value2, "distrito");
            return (Criteria) this;
        }

        public Criteria andDistritoNotBetween(String value1, String value2) {
            addCriterion("distrito not between", value1, value2, "distrito");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}